/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.171
 Source Server Type    : MySQL
 Source Server Version : 50722
 Source Host           : 192.168.146.171:3306
 Source Schema         : oauth2

 Target Server Type    : MySQL
 Target Server Version : 50722
 File Encoding         : 65001

 Date: 19/12/2018 10:02:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for oauth_client_details
-- ----------------------------
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details`  (
  `client_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `scope` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `authorized_grant_types` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `web_server_redirect_uri` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `authorities` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `access_token_validity` int(11) NULL DEFAULT NULL,
  `refresh_token_validity` int(11) NULL DEFAULT NULL,
  `additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`client_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Records of oauth_client_details
-- ----------------------------
BEGIN;
INSERT INTO `oauth_client_details` VALUES ('client1', 'admin', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6', 'select,all,ROLE_USER', 'password,authorization_code', 'http://www.baidu.com', NULL, NULL, NULL, NULL, 'select'), ('CouponSystem', 'admin', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6', 'user_info,ROLE_USER', 'authorization_code', 'http://localhost:8082/login', NULL, NULL, NULL, NULL, 'user_info'), ('MemberSystem', 'admin', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6', 'user_info,ROLE_USER', 'authorization_code', 'http://localhost:8081/login', NULL, NULL, NULL, NULL, 'user_info');
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NULL DEFAULT NULL,
  `rolename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, 1, 'admin'), (2, 1, 'owner'), (3, 1, 'select'), (4, 1, 'ROLE_USER');
COMMIT;

-- ----------------------------
-- Table structure for sysuser
-- ----------------------------
DROP TABLE IF EXISTS `sysuser`;
CREATE TABLE `sysuser`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;

-- ----------------------------
-- Records of sysuser
-- ----------------------------
BEGIN;
INSERT INTO `sysuser` VALUES (1, 'admin', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6'), (2, 'cxw', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6'), (3, 'user', '$2a$10$kKGUFXStteFp5w4LJvP.SO0Uox2sigJ38jOYXUgso6XxUzdHCacP6');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
